//
//  AddBankController.m
//  LiquorChain
//
//  Created by apple on 2019/1/3.
//  Copyright © 2019年 王冬. All rights reserved.
//

#import "AddBankController.h"

@interface AddBankController ()
///开户行
@property (nonatomic,strong) UITextField *nameTextField;
/// 卡号
@property (nonatomic,strong) UITextField *bankNumberTextFiled;
@property (nonatomic,strong) UIButton *addBankBtn;
@end

@implementation AddBankController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"添加银行卡";
    self.view.backgroundColor = BACKGROUNDCOLOR;
    
    UIView *headView =[[UIView alloc]init];
    [self.view addSubview:headView];
    headView.backgroundColor =[UIColor whiteColor];
    [headView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(kNavBarHeight +15);
        make.height.mas_equalTo(101);
    }];
    self.bankNumberTextFiled =[[UITextField alloc]init];
    [headView addSubview:self.bankNumberTextFiled];
    self.bankNumberTextFiled.placeholder = @"请输入银行卡的卡号";
    self.bankNumberTextFiled.font =[UIFont systemFontOfSize:14];
    [self.bankNumberTextFiled mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.left.mas_equalTo(14);
        make.right.mas_equalTo(-14);
        make.height.mas_equalTo(50);
    }];
    UILabel *lineLabel =[[UILabel alloc]init];
    [headView addSubview:lineLabel];
    lineLabel.backgroundColor =BACKGROUNDCOLOR;
    [lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(50);
        make.height.mas_equalTo(0.4);
    }];
    self.nameTextField =[[UITextField alloc]init];
    [headView addSubview:self.nameTextField];
    self.nameTextField.placeholder = @"请输入银行卡的开户行";
    self.nameTextField.font =[UIFont systemFontOfSize:14];
    [self.nameTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(51);
        make.left.mas_equalTo(14);
        make.right.mas_equalTo(-14);
        make.height.mas_equalTo(50);
    }];
    self.addBankBtn =[UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:self.addBankBtn];
    [self.addBankBtn setTitle:@"确认添加" forState:UIControlStateNormal];
    [self.addBankBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.addBankBtn.backgroundColor = CUSTOMCOLOR;
    self.addBankBtn.layer.cornerRadius = 5;
    [self.addBankBtn addTarget:self action:@selector(addBankClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.addBankBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.right.mas_equalTo(-15);
        make.top.mas_equalTo(headView.mas_bottom).with.offset(50);
        make.height.mas_equalTo(50);
    }];
    
    
}
-(void)addBankClick:(UIButton *)sender{
    NSLog(@"确认添加");
}

@end
